//package com.LachesismStorm.lachesism.core.email;
//
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//
//@Component
//public class SendEmail {
//    // QQ 邮箱配置
//    @Value("${email.qq.host}")
//    private static String qqHost;
//    @Value("${email.qq.port}")
//    private static String qqPort;
//    @Value("${email.qq.username}")
//    private static String qqUsername;
//    @Value("${email.qq.password}")
//    private static String qqPassword;
//
//    // Google 邮箱配置
//    @Value("${email.google.host}")
//    private static String googleHost;
//    @Value("${email.google.port}")
//    private static String googlePort;
//    @Value("${email.google.username}")
//    private static String googleUsername;
//    @Value("${email.google.password}")
//    private static String googlePassword;
//
//    // 163 邮箱配置
//    @Value("${email.163.host}")
//    private static String neteaseHost;
//    @Value("${email.163.port}")
//    private static String neteasePort;
//    @Value("${email.163.username}")
//    private static String neteaseUsername;
//    @Value("${email.163.password}")
//    private static String neteasePassword;
//
//    // 静态的EmailUtil实例
//    private static EmailUtil netEaseEmailUtil;
//    private static EmailUtil qqEmailUtil;
//    private static EmailUtil googleEmailUtil;
//
//    // 使用@PostConstruct初始化EmailUtil
//    @PostConstruct
//    public void init() {
//        // 在容器初始化时，通过配置参数来初始化EmailUtil实例
//        netEaseEmailUtil = new EmailUtil(neteaseHost, neteaseUsername, neteasePassword, neteasePort);
//        qqEmailUtil = new EmailUtil(qqHost, qqUsername, qqPassword, qqPort);
//        googleEmailUtil = new EmailUtil(googleHost, googleUsername, googlePassword, googlePort);
//    }
//
//    // 发送普通邮件
//    public static void sendEmailByNetEaseMail(String to, String subject, String content) {
//        netEaseEmailUtil.sendEmail(to, subject, content);
//    }
//
//    public static void sendEmailByQQMail(String to, String subject, String content) {
//        qqEmailUtil.sendEmail(to, subject, content);
//    }
//
//    public static void sendEmailByGoogleMail(String to, String subject, String content) {
//        googleEmailUtil.sendEmail(to, subject, content);
//    }
//
//    // 发送带 HTML 内容的邮件
//    public static void sendHtmlEmailByNetEaseMail(String to, String subject, String htmlFilePath) {
//        netEaseEmailUtil.sendHtmlEmail(to, subject, htmlFilePath);
//    }
//
//    public static void sendHtmlEmailByQQMail(String to, String subject, String htmlFilePath) {
//        qqEmailUtil.sendHtmlEmail(to, subject, htmlFilePath);
//    }
//
//    public static void sendHtmlEmailByGoogleMail(String to, String subject, String htmlFilePath) {
//        googleEmailUtil.sendHtmlEmail(to, subject, htmlFilePath);
//    }
//
//    // 发送带附件的邮件
//    public static void sendEmailWithAttachmentByNetEaseMail(String to, String subject, String content, String attachmentPath) {
//        netEaseEmailUtil.sendEmailWithAttachment(to, subject, content, attachmentPath);
//    }
//
//    public static void sendEmailWithAttachmentByQQMail(String to, String subject, String content, String attachmentPath) {
//        qqEmailUtil.sendEmailWithAttachment(to, subject, content, attachmentPath);
//    }
//
//    public static void sendEmailWithAttachmentByGoogleMail(String to, String subject, String content, String attachmentPath) {
//        googleEmailUtil.sendEmailWithAttachment(to, subject, content, attachmentPath);
//    }
//}
